package com.ttbj.product.cargo.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ttbj.api.cargo.CargoService;
import com.ttbj.api.dto.cargo.CargoDto;
import com.ttbj.api.exception.BusinessException;
import com.ttbj.cargo.dao.CargoMapper;
import com.ttbj.constant.PlatFormErrorCode;

@Service("cargoService")
public class CargoServiceImpl implements CargoService{

	@Autowired
	private CargoMapper cargoMapper;
	
	
	@Override
	public CargoDto findCargoInfoById(Long cargoId) throws BusinessException {
		if (null == cargoId) {
			throw new BusinessException("参数有误", PlatFormErrorCode.PARAM_IS_NULL.code());
		}
		CargoDto cargoDto = this.cargoMapper.queryCargoInfoById(cargoId);
		return cargoDto;
	}
	
	
}
